home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
CWL2A_1.ARJ
/
README
< prev
next >
Wrap
Text File
|
1991-11-17
|
19KB
|
479 lines
THE C WINDOW LIBRARY
(c) Copyright P. A. McKenzie 1990, 1991
All Rights Reserved
Version 2.0a
Author: P.A. McKenzie
CitySoft Software
100-3 Alcott Place
Bronx, N.Y. 10475
Compuserve : [72537,17]
Bix : "pmckenzie"
CitySoft Software BBS : (212) 671 - 4379
(BBS operational on April 1st, 1991)
The C Window Library Copyright 1990,1991 P. A. Mckenzie.
All Rights Reserved.
PC-DOS, PC, PC XT, PC AT, and PS/2 are trademarks of IBM
Corporation.
MS-DOS, Microsoft C, and Quick C are trademarks of Microsoft Corporation.
Turbo C and other mentioned Borland products are trademarks of Borland
International Inc.
Power C is a trademark of Mix Software.
Zortech C++ is a trademark of Zortech Limited.
Hercules is a trademark of the Hercules Corporation.
1-2-3 is a trademark of Lotus Development Corporation.
DESQview is a trademark of Quarterdeck Office Systems.
All others that have gone unmentioned are copyrights of their respective
companies.
INTRODUCTION TO THE C WINDOW LIBRARY
Welcome to The C Window Library! The C Window Library is an add-on C library
that will add powerful text windows, virtual window, menu, mouse support,
and other miscellaneous video goodies to your C programs. Included in the
shareware package is a full 300+ page manual with descriptions of all
functions and examples of every aspect of The C Window Library. Currently
the library supports the following compilers:
Microsoft C Ver 5.1 and above
Quick C Ver. 2.0 and above
Turbo C Ver. 2.0 and above, Turbo C++ Ver 1.0 and above, Borland C++.
Power C Ver. 2.1 and above
Zortech C++ Ver. 2.1 and above
The C Window Library is written in 90% C, with the other 10% in assembly
language.
The goal of The C Window Library is to get the library up to par with the
other expensive C libraries around, without draining your wallet. If you have
used other shareware window libraries, you will be in for a pleasant surprise
with The C Window Library. The features available with The C Window Library
are very extensive, without locking you into rigid restrictions that other
window libraries would give you.
REGISTRATION INFORMATION
When you register your version of The C Window Library, you will receive the
following:
a) free update to the next major revision of The C Window Library.
b) full source code to the window library and all memory models.
If you register your version of The C Window Library before March 1, 1992
you will receive The C Data Forms Library and source code absolutely free.
After this date, the library will cost an additional $25.
Also available will be The C Mouse Library. This library allows you to
create applications that are mouse event driven. Read the ORDER.FRM file
for more information on this great add-on to The C Window Library.
To register The C Window Library, as well as ordering The Data Forms and
Mouse Libraries, you should print the file ORDER.FRM. Do this by issuing
the command on the DOS command line:
TYPE ORDER.FRM > PRN
This file contains the order form as well as additional information on the
Data Forms and Mouse libraries.
Since there are slight changes in the source code due to bug fixes, minor
enhancements, etc., customers who have paid the $50 registration fee will
receive updated source code no more than four times per calendar year.
However, any major revision done to The C Window Library will entitle
registered users to the source code immediately.
Remember that the shareware version of the library IS NOT CRIPPLED. You can
create real applications right away with the shareware version, and you get
the full documentation. Therefore I am trusting you (the user) to send in
the registration fee (see below for a description of shareware and what the
responsibilities of the user of shareware products are). I am sure that you
want to reward fellow programmers on what they have developed.
If you want to develop data entry forms with The C Window Library, it is wise
to get The C Data Forms Library. This library is a set of routines that
allow you to set up data entry forms that have many capabilities. See the
offer above for availability.
TECHNICAL SUPPORT
Technical support is provided for registered as well as non-registered users
of The C Window Library. Since The C Window Library is currently a shareware
product, technical support will be provided for persons who are in the
evaluation stages of the product. However, for any questions concerning
internals of The C Window Library where the source code must be present to
such persons asking technical assistance, only registered users will get
technical support.
You can get technical support in four ways:
1) E-Mail to Compuserve [72537,17]
2) E-Mail on BIX (Byte Information Exchange) to "pmckenzie"
3) E-Mail to the CitySoft Software bulletin board. The phone number is
(212) 671 - 4379.
4) by mail
Responses to questions on BIX or CompuServe will be done on a daily basis.
If responding by Compuserve, or BIX, leave your name, registration number
if necessary, compiler and version, version of The C Window Library, and
Compuserve or BIX number. If responding by mail, please leave name,
registration number if necessary, compiler and version, the version of The C
Window Library, and a phone number where you can be reached during the times
of 10:00 AM and 6:00 PM Eastern Time.
You can also log into the CitySoft Software BBS at (212) 671 - 4379. You will
have immediate access to the newest shareware version of the library. If
you register your shareware version, you will be given access to download the
registered version of the library. You should log on using the following
parameters:
a) 1200 or 2400 baud
b) 8 data bits
c) 1 stop bits
d) no parity
DEFINITION OF SHAREWARE
Shareware distribution gives users a chance to try software before buying it.
If you try a Shareware program and continue using it, you are expected to
register. Individual programs differ on details -- some request registration
while others require it, some specify a maximum trial period. With
registration, you can continue using the software, full source code to the C
Window Library, and free upgrades.
Copyright laws apply to both Shareware and commercial software, and the
copyright holder retains all rights, with a few specific exceptions as stated
below. Shareware authors are accomplished programmers, just like commercial
authors, and the programs are of comparable quality. (In both cases, there are
good programs and bad ones!) The main difference is in the method of
distribution. The author specifically grants the right to copy and distribute
the software, either to all and sundry or to a specific group. For example,
some authors require written permission before a commercial disk vendor may
copy their Shareware.
Shareware is a distribution method, not a type of software. You should find
software that suits your needs and pocketbook, whether it's commercial or
Shareware. The Shareware system makes fitting your needs easier, because you
can try before you buy. And because the overhead is low, prices are low also.
Shareware has the ultimate money-back guarantee -- if you don't use the
product, you don't pay for it.
DISCLAIMER - AGREEMENT
Users of The C Window Library must accept this disclaimer of warranty:
"The C Window Library is supplied as is. The author disclaims all warranties,
expressed or implied, including, without limitation, the warranties of
merchantability and of fitness for any purpose. The author assumes no
liability for damages, direct or consequential, which may result from the
use of The C Window Library."
The C Window Library is a "shareware program" and is provided at no charge to
the user for evaluation. Feel free to share it with your friends, but please
do not give it away altered or as part of another system. The essence of
"user-supported" software is to provide personal computer users with quality
software without high prices, and yet to provide incentive for programmers to
continue to develop new products. If you find this program useful and find
that you are using The C Window Library and continue to use The C Window
Library after a reasonable trial period, you must make a registration payment
of $50 to CitySoft Software. The $50 registration fee will license one copy
for use on any one computer at any one time. You must treat this software
just like a book. An example is that this software may be used by any number
of people and may be freely moved from one computer location to another, so
long as there is no possibility of it being used at one location while it's
being used at another. Just as a book cannot be read by two different
persons at the same time.
Commercial users of The C Window Library must register and pay for their
copies of The C Window Library within 30 days of first use or their license is
withdrawn. Site-License arrangements may be made by contacting CitySoft
Software.
Anyone distributing The C Window Library for any kind of remuneration must
first contact CitySoft Software at the address above for authorization. This
authorization will be automatically granted to distributors recognized by the
(ASP) as adhering to its guidelines for shareware distributors, and such
distributors may begin offering The C Window Library immediately (However
CitySoft Software must still be advised so that the distributor can be kept
up-to-date with the latest version of The C Window Library.).
You are encouraged to pass a copy of The C Window Library along to your
friends for evaluation. Please encourage them to register their copy if they
find that they can use it. All registered users will receive a copy of the
latest version of the The C Window Library system.
There are no royalties on any commercial or non-commercial application that
you develop. However, CitySoft Software strictly prohibits you from creating
an application that is similar in design to The C Window Library i.e. another
window library.
USING THE C WINDOW LIBRARY
If you are not familiar with using third party libraries and how to link
the library with the rest of your code, please consult the various
documentation supplied with the compiler that you are working with. This is
not a full tutorial on how to link third party libraries.
The default word/byte alignment scheme was used when compiling all the
libraries. In other words, all modules were compiled without the use of the
word/byte alignment switch being used.
Header Files and Library Files
------------------------------
The following library files are provided in the shareware version:
MSWINM.LIB -- Medium memory model version for Microsoft C 5.1 and above,
and Quick C Version 1.0 and above.
PCWINM.MIX -- Medium memory model version for Power C Version 2.0 and
above.
TCWINM.LIB -- Medium memory model version for Turbo C Version 1.5 and
above or Turbo C++ Version 1.0 and above.
ZCWINM.LIB -- Medium memory model version for Zortech C++ Version 2.0 and
above.
The following libraries are needed to implement the mouse in The C Window
Library:
MSMOUSEM.LIB -- Medium memory model for Microsoft C 5.1
and above, and Quick C Version 1.0 and above.
PCMOUSEM.MIX -- Medium memory model version for Power C Version 2.0 and
above.
TCMOUSEM.LIB -- Medium memory model version for Turbo C Version 1.5 and
above or Turbo C++ Version 1.0 and above.
ZCMOUSEM.LIB -- Medium memory model version for Zortech C++ Version 2.0 and
above.
The mouse libraries defined above are subsets of The C Mouse Library. To
order the full version of The C Mouse Library, read the ORDER.FRM file.
The header files included are the following:
BSTRING.H
CURSOR.H
EFFECTS.H
KEY.H
KEYCODES.H
MENU.H
MISC.H
PROTO.H
USCORE.H
VIDSYS.H
WERROR.H
WINDOW.H
WSTRUCT.H
CWLMOUSE.H
Microsoft / Quick C
-------------------
When compiling your programs, you must make sure that the constant MSC is
defined. An example of how you would do this as follows:
cl -Ax -DMSC -Ihfiles prog1.c prog2.c /link mswinx.lib msmousex.lib
the -Ax is the model used for compilation. The x stands for either S for
small, M for medium, C for compact, or L for large. The -D option defines a
constant, which in this case is MSC. You must use the -D switch with MSC as
the constant. If not, you will get either syntax errors, link errors, or
runtime errors. The -I option tells the compiler that the .h files are
located in a directory on the default drive called hfiles. The /link option
links the resulting object files (prog1.obj and prog2.obj) with the The C
Window Library file mswinx.lib, where x stands for S, M, C, or L. The mouse
library msmousex.lib, where x stands for S, M, C, or L, is necessary only if
you plan to use the mouse in your application.
The other method is to create a make file. If you are using the integrated
environment of Quick C or using the Programmers Work Bench (PWB) for
Microsoft C 6.0, you can create your make files by selecting the files you
want to compile, and the libraries you want to link with and letting these
integrated environments create the make file automatically. If you are more
advanced you can create your make files by yourself without the aid of these
programs. Consult the documentation for more information on make files.
Turbo C and TurboC++
--------------------
If you will use the integrated environment, you must create a project file.
This project file specifies the source code modules, object code modules, and
libraries that will be linked in to produce an executable file. If you use
the Turbo C Ver 2.0 integrated environment, you must edit this file yourself.
If you use the Turbo C++ integrated environment, use the automatic Project
File creator.
You can also use make files to link in your program. Make sure that the
desired library from The C Window Toolkit is specified.
You can also use the TCC.EXE command line compiler with the desired library
specified on the command line. Consult the Turbo C documentation on using
make files and using the integrated environment.
The default structure alignment was used to compile the libraries, which
is byte alignment.
An example of using the TCC.EXE command line is as follows:
tcc -mm -G -r -ihfiles prog1.c tcwinm.lib tcmousem.lib
The following command line uses -mm for the medium memory model, -G to
optimize for speed, -r for usage of register variables, and -i to tell the
compiler that the header files are located in a directory on the default
drive called hfiles. The mouse library, tcmousem.lib, is necessary only if
you plan to use the mouse in your application.
Power C
-------
If you are using the POWER C compiler from Mix Software, you must define
the constant POWERC on the command line.
pc -dPOWERC -mm -ihfiles prog1.c
You must have the constant POWERC defined on the pc.exe command line using
the -d option. If not, you may get syntax, link, or runtime errors.
The -mm tells the compiler to use the medium memory model, and the -i option
tells the compiler that there are .h files located on the default drive in
the directory hfiles.
Depending on the number of windows your application will use and the code
size, you will have to use different stack and heap options in the Power C
linker, pcl. An example of this is as follows:
pcl [20k,30k,200k] a;pcwinm;pcmousem
This will link the object file a.mix with the pcwinm.mix library with 20k of
stack space, 30k of near heap space, and 200k of far heap space. If your
application has many or very large virtual windows, you should use the maximum
far heap space allowable. If your program has many windows, you should
increase the near heap space parameter, or use the pcwinl.mix library and
increase the far heap space parameter. If your program has recursive or
deeply nested functions, you should increase the stack parameter. However the
stack and near heap space cannot exceed 64k. This includes global and static
declarations in the program. The mouse library, pcmousem, is necessary
only if you plan to use the mouse in your application.
Zortech C++
-----------
If you are using the Zortech C++ compiler, you should use the following
options when compiling your program with The C Window Library:
ztc -o -b -p -mm prog1.c zcwinm.lib zcmousem.lib
The -o option turns on the global optimizer. The -b option lets ztc know to
handle large programs. The -p turns off autoprotyping. The -mm option lets
the compiler use the medium memory model. The programs prog1.c is compiled
using these options and then linked with the medium memory model of The C
Window Library's Zortech version, namely zcwinm.lib.
The mouse library, zcmousem.lib, is necessary only if you plan to use the
mouse in your application.